package com.chen.servicemap.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.chen.servicemap.entity.DicDistrict;
import com.chen.servicemap.mapper.DisDistrictMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chenLiuPing
 **/
@RestController
public class TestController {
    @Autowired
    private DisDistrictMapper disDistrictMapper;

    @GetMapping("/test")
    public String testMapper() {
        QueryWrapper<DicDistrict> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("address_code", "110000");
        return disDistrictMapper.selectOne(queryWrapper).toString();
    }
}
